<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>欢迎页面-X-admin2.2</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />-->
<link rel="stylesheet" href="../css/font.css">
<link rel="stylesheet" href="../css/xadmin.css">
<script src="../lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../js/xadmin.js"></script>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

<div class="layui-fluid">
<div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">
              订单动态
                <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
            </div>
            <div class="layui-card-body ">
              <ul class="layui-timeline" id="timeline">

                <li class="layui-timeline-item" id="flow">
                  <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                  <div class="layui-timeline-content layui-text">
                    <h3 class="layui-timeline-title"></h3>
                    <p>
                        <span>--------------------</span><br>
                        <span>暂无动态</span><br>
                        <span>--------------------</span>
                    </p>
                  </div>
                </li>
              </ul>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
<script src="../js/jquery-1.4.2.js"></script>
<script src="../js/common/ajaxcommon.js"></script>
<script>
    //获取url中的值
    function getParams(id){
        var reg = new RegExp("(^|&)" + id + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null){
            return unescape(r[2]);
        }
        return null;
    }
    var orderId = getParams("orderId"); //将获取的url的值赋值给变量id，

    if (orderId!=null){
        var $timeline=$("#timeline");
        var $li= $timeline.find("li:eq(0)");
        requestAjax("/background/timeIine/getOrderIdFindAll",{orderId:orderId},function (data) {
            if (data.result){
                $timeline.empty();
                for ( var i in data.data) {
                    var $flows=$li.clone();
                    $flows.find("h3").text(renderTime(data.data[i].modeifyDate));
                    $flows.find("span").eq(0).text("状态:"+data.data[i].statusName);
                    $flows.find("span").eq(1).text("操作员:"+data.data[i].operatorId.substring(1));
                    if (data.data[i].returnReson!=null&&data.data[i].returnReson!=='')
                        $flows.find("span").eq(2).html("驳回原因:"+data.data[i].returnReson);
                    else
                        $flows.find("span").eq(2).remove();
                    $timeline.append($flows);
                }
            }
        })
    }

</script>